package com.ws.service;

import com.ws.domain.Item;
import com.ws.mapper.ItemMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ItemService {

    @Autowired
    private ItemMapper itemMapper;

    /**
     * 根据订单id查询订单项
     * @param orderId
     * @return
     */
    public List<Item> getItemsByOrderId(int orderId){
        return itemMapper.getItemsByOrderId(orderId);
    }
}
